
using System.Security.Claims;


namespace english_sentences.Utilities
{
    public static class UserHelper
    {
        public static string GetId(this ClaimsPrincipal user)
        {
            var userId = user.Claims.Where(n => n.Type == ClaimTypes.Sid).Select(n => n.Value).FirstOrDefault();

            if (string.IsNullOrEmpty(userId)) return string.Empty;

            return userId;
        }
    }
}


